namespace ext.tree
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>Configuration Structure</summary>
	/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
	public sealed class TreeLoader_Configuration : Record
	{
		
		#region Fields
		/// <summary>
		/// The URL from which to request a Json string which
		/// specifies an array of node definition objects representing the child nodes
		/// to be loaded.
		/// </summary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		[ScriptName("dataUrl")]
		public string DataUrl;
		
		/// <summary>The HTTP request method for loading data (defaults to the value of {@link Ext.Ajax#method}).</summary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		[ScriptName("requestMethod")]
		public string RequestMethod;
		
		/// <summary>Equivalent to {@link #dataUrl}.</summary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		[ScriptName("url")]
		public string Url;
		
		/// <summary>If set to true, the loader recursively loads &quot;children&quot; attributes when doing the first load on nodes.</summary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		[ScriptName("preloadChildren")]
		public bool PreloadChildren;
		
		/// <summary>
		/// An object containing properties which
		/// specify HTTP parameters to be passed to each request for child nodes.
		/// </summary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("baseParams")]
		public object BaseParams;
		
		/// <summary>
		/// An object containing attributes to be added to all nodes
		/// created by this loader. If the attributes sent by the server have an attribute in this object,
		/// they take priority.
		/// </summary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("baseAttrs")]
		public object BaseAttrs;
		
		/// <summary>
		/// An object containing properties which
		/// specify custom {@link Ext.tree.TreeNodeUI} implementations. If the optional
		/// uiProvider attribute of a returned child node is a string rather
		/// than a reference to a TreeNodeUI implementation, then that string value
		/// is used as a property name in the uiProviders object.
		/// </summary>
		/// <htmlSummary>
		/// An object containing properties which
		/// specify custom {@link Ext.tree.TreeNodeUI} implementations. If the optional
		/// &lt;i&gt;uiProvider&lt;/i&gt; attribute of a returned child node is a string rather
		/// than a reference to a TreeNodeUI implementation, then that string value
		/// is used as a property name in the uiProviders object.
		/// </htmlSummary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("uiProviders")]
		public object UiProviders;
		
		/// <summary>
		/// Default to true. Remove previously existing
		/// child nodes before loading.
		/// </summary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("clearOnLoad")]
		public bool ClearOnLoad;
		
		/// <summary>
		/// Defaults to undefined. Only used when using directFn.
		/// Specifies the params in the order in which they must be passed to the server-side Direct method
		/// as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
		/// comma, or pipe. For example,
		/// any of the following would be acceptable: 
		/// nodeParameter: &apos;node&apos;,
		/// paramOrder: [&apos;param1&apos;,&apos;param2&apos;,&apos;param3&apos;]
		/// paramOrder: &apos;node param1 param2 param3&apos;
		/// paramOrder: &apos;param1,node,param2,param3&apos;
		/// paramOrder: &apos;param1|param2|param|node&apos;
		/// </summary>
		/// <htmlSummary>
		/// Defaults to &lt;tt&gt;undefined&lt;/tt&gt;. Only used when using directFn.
		/// Specifies the params in the order in which they must be passed to the server-side Direct method
		/// as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
		/// comma, or pipe. For example,
		/// any of the following would be acceptable:&lt;pre&gt;&lt;code&gt;
		/// nodeParameter: &apos;node&apos;,
		/// paramOrder: [&apos;param1&apos;,&apos;param2&apos;,&apos;param3&apos;]
		/// paramOrder: &apos;node param1 param2 param3&apos;
		/// paramOrder: &apos;param1,node,param2,param3&apos;
		/// paramOrder: &apos;param1|param2|param|node&apos;
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		[ScriptName("paramOrder")]
		public ext.auto.System_String_Or_System_Array ParamOrder;
		
		/// <summary>
		/// Only used when using directFn.
		/// Send parameters as a collection of named arguments (defaults to false). Providing a
		/// {@link #paramOrder} nullifies this configuration.
		/// </summary>
		/// <htmlSummary>
		/// Only used when using directFn.
		/// Send parameters as a collection of named arguments (defaults to &lt;tt&gt;false&lt;/tt&gt;). Providing a
		/// &lt;tt&gt;{@link #paramOrder}&lt;/tt&gt; nullifies this configuration.
		/// </htmlSummary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		[ScriptName("paramsAsHash")]
		public bool ParamsAsHash;
		
		/// <summary>
		/// The name of the parameter sent to the server which contains
		/// the identifier of the node. Defaults to &apos;node&apos;.
		/// </summary>
		/// <htmlSummary>
		/// The name of the parameter sent to the server which contains
		/// the identifier of the node. Defaults to &lt;tt&gt;&apos;node&apos;&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		[ScriptName("nodeParameter")]
		public string NodeParameter;
		
		/// <summary>Function to call when executing a request.</summary>
		/// <definedin>src\widgets\tree\TreeLoader.js</definedin>
		[ScriptName("directFn")]
		public System.Delegate DirectFn;
		#endregion
		
		#region ext.util.Observable_Configuration Members
		/// <summary>
		/// A config object containing one or more event handlers to be added to this
		/// object during initialization. This should be a valid listeners config object as specified in the
		/// {@link #addListener} example for attaching multiple handlers at once.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;A config object containing one or more event handlers to be added to this
		/// object during initialization. This should be a valid listeners config object as specified in the
		/// {@link #addListener} example for attaching multiple handlers at once.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;DOM events from ExtJs {@link Ext.Component Components}&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;While &lt;i&gt;some&lt;/i&gt; ExtJs Component classes export selected DOM events (e.g. &quot;click&quot;, &quot;mouseover&quot; etc), this
		/// is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}&apos;s
		/// &lt;b&gt;&lt;code&gt;{@link Ext.DataView#click click}&lt;/code&gt;&lt;/b&gt; event passing the node clicked on. To access DOM
		/// events directly from a Component&apos;s HTMLElement, listeners must be added to the &lt;i&gt;{@link Ext.Component#getEl Element}&lt;/i&gt; after the Component
		/// has been rendered. A plugin can simplify this step:&lt;pre&gt;&lt;code&gt;
		/// // Plugin is configured with a listeners config object.
		/// // The Component is appended to the argument list of all handler functions.
		/// Ext.DomObserver = Ext.extend(Object, {
		/// constructor: function(config) {
		/// this.listeners = config.listeners ? config.listeners : config;
		/// },
		///
		/// // Component passes itself into plugin&amp;#39;s init method
		/// init: function(c) {
		/// var p, l = this.listeners;
		/// for (p in l) {
		/// if (Ext.isFunction(l[p])) {
		/// l[p] = this.createHandler(l[p], c);
		/// } else {
		/// l[p].fn = this.createHandler(l[p].fn, c);
		/// }
		/// }
		///
		/// // Add the listeners to the Element immediately following the render call
		/// c.render = c.render.{@link Function#createSequence createSequence}(function() {
		/// var e = c.getEl();
		/// if (e) {
		/// e.on(l);
		/// }
		/// });
		/// },
		///
		/// createHandler: function(fn, c) {
		/// return function(e) {
		/// fn.call(this, e, c);
		/// };
		/// }
		/// });
		///
		/// var combo = new Ext.form.ComboBox({
		///
		/// // Collapse combo when its element is clicked on
		/// plugins: [ new Ext.DomObserver({
		/// click: function(evt, comp) {
		/// comp.collapse();
		/// }
		/// })],
		/// store: myStore,
		/// typeAhead: true,
		/// mode: &apos;local&apos;,
		/// triggerAction: &apos;all&apos;
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\ext-core\src\util\Observable.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("listeners")]
		public object Listeners;
		#endregion
	}
}
